import java.util.Scanner;

public class Add {
    public static int fin(int n) {
        if(1 == n){
            return n;
        }else{
            return n * fin(n-1);
        }
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(fin(n));
    }
}
